package com.woniuxy.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.woniuxy.entity.Bidding;
import com.woniuxy.entity.BiddingRoom;
import com.woniuxy.mapper.BiddingRoomMapper;
import com.woniuxy.service.BiddingRoomService;
import com.woniuxy.utils.ResultUtil;


@Service
public class BiddingRoomServiceImpl implements BiddingRoomService{
	
	@Autowired
	BiddingRoomMapper biddingRoomMapper;

	@Override
	public List<BiddingRoom> BiddRoomInfoByuid(int u_id) {
		
		
		
		return biddingRoomMapper.BiddRoomInfoByuid(2);
	}

	@Override
	public int deleroomByuidAndpid(int uid, int pid) {
		BiddingRoom biddingRoom = new BiddingRoom();
		 biddingRoom.setP_id(pid).setU_id(uid);
		int result = biddingRoomMapper.deleroomByuidAndpid(biddingRoom);
				
		return result;
	}

	@Override
	public List<Bidding> salelogAll() {
		List<Bidding> result = new ArrayList<>();
		 result =	biddingRoomMapper.salelogAll();
	
		
		
		
		return result;
	}

	

	
	
	
}
